package com.walk.zworld.mvvm.vm

import androidx.lifecycle.LiveData
import com.walk.zworld.mvvm.repository.SystemRepository
import com.base.lib.httpUtils.NavigationBean
import com.base.lib.base.mvvm.viewmodel.BaseRefreshViewModel

class NavigationViewModel : BaseRefreshViewModel<NavigationBean>() {

    private val repository = SystemRepository()

    fun getNavigationTree(): LiveData<List<NavigationBean>>{
        launchUI {
            val res = repository.getNavigationTree()
            mData.value = res.data
        }
        return mData
    }

    override fun refreshData(params: Any?) {
        getNavigationTree()
    }

    override fun loadMore(params: Any?) {
//        getNavigationTree()
    }
}